home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / 001. Sample.cpt / Sample.h < prev    next >
Text File  |  1988-08-01  |  4KB  |  99 lines

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    MultiFinder-Aware Simple Sample Application
  6. #
  7. #    Sample
  8. #
  9. #    Sample.h    -    Rez and C Include Source
  10. #
  11. #    Copyright © 1988 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    1.0                    8/88
  15. #
  16. #    Components:    Sample.p            August 1, 1988
  17. #                Sample.c            August 1, 1988
  18. #                Sample.r            August 1, 1988
  19. #                Sample.h            August 1, 1988
  20. #                PSample.make        August 1, 1988
  21. #                CSample.make        August 1, 1988
  22. #
  23. #    Sample is an example application that demonstrates how to
  24. #    initialize the commonly used toolbox managers, operate 
  25. #    successfully under MultiFinder, handle desk accessories, 
  26. #    and create, grow, and zoom windows.
  27. #
  28. #    It does not by any means demonstrate all the techniques 
  29. #    you need for a large application. In particular, Sample 
  30. #    does not cover exception handling, multiple windows/documents, 
  31. #    sophisticated memory management, printing, or undo. All of 
  32. #    these are vital parts of a normal full-sized application.
  33. #
  34. #    This application is an example of the form of a Macintosh 
  35. #    application; it is NOT a template. It is NOT intended to be 
  36. #    used as a foundation for the next world-class, best-selling, 
  37. #    600K application. A stick figure drawing of the human body may 
  38. #    be a good example of the form for a painting, but that does not 
  39. #    mean it should be used as the basis for the next Mona Lisa.
  40. #
  41. #    We recommend that you review this program or TESample before 
  42. #    beginning a new application.
  43. ------------------------------------------------------------------------------*/
  44.  
  45. /*    these #defines correspond to values defined in the Pascal source code.
  46.     Sample.c includes this file. */
  47.  
  48. #define kMinSize    22                /* application's minimum size (in K) */
  49. /* we looked at a heap dump while the program was running */
  50. /* it was using about 14K; we added 8K for stack & 0K for
  51. scraps as Sample has no edit capability */
  52. #define kPrefSize    26                /* application's preferred size (in K) */
  53. /* we made this (preferred) size bigger than the other (minimum) size */
  54. /* so you can have more stack */
  55.  
  56. #define    rMenuBar    128                /* application's menu bar */
  57. #define    rAboutAlert    128                /* about alert */
  58. #define    rWindow        128                /* application's window */
  59. #define rStopRect    128                /* rectangle for Stop light */
  60. #define rGoRect        129                /* rectangle for Go light */
  61.  
  62. /* SysEnvironsVersion is passed to SysEnvirons to tell it which version of the
  63.    SysEnvRec we understand. */
  64. #define    sysEnvironsVersion        1
  65.  
  66. /* OSEvent is the event number of the suspend/resume and mouse-moved events sent
  67.    by MultiFinder. Once we determine that an event is an osEvent, we look at the
  68.    high byte of the message sent to determine which kind it is. To differentiate
  69.    suspend and resume events we check the resumeMask bit. */
  70. #define    osEvent                    app4Evt    /* event used by MultiFinder */
  71. #define    suspendResumeMessage    1        /* high byte of suspend/resume event message */
  72. #define    resumeMask                1        /* bit of message field for resume vs. suspend */
  73. #define    mouseMovedMessage        0xFA    /* high byte of mouse-moved event message */
  74.  
  75. /* The following constants are used to identify menus and their items. The menu IDs
  76.    have an "m" prefix and the item numbers within each menu have an "i" prefix. */
  77. #define    mApple                    128        /* Apple menu */
  78. #define    iAbout                    1
  79.  
  80. #define    mFile                    129        /* File menu */
  81. #define    iNew                    1
  82. #define    iClose                    4
  83. #define    iQuit                    12
  84.  
  85. #define    mEdit                    130        /* Edit menu */
  86. #define    iUndo                    1
  87. #define    iCut                    3
  88. #define    iCopy                    4
  89. #define    iPaste                    5
  90. #define    iClear                    6
  91.  
  92. #define    mLight                    131        /* Light menu */
  93. #define    iStop                    1
  94. #define    iGo                        2
  95.  
  96. /* ExtremeNeg and ExtremePos are used to set up wide open rectangles and regions. */
  97. #define extremeNeg                -32768
  98. #define extremePos                32767 - 1 /* required to address an old region bug */
  99.